package com.zhang.zxx.boot.common.core.aspect;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

/**
 * IgnoredJsonSerializer:忽略字段序列化器
 *
 * @author zhangxiaoxiang
 * @date 2021年11月27日
 */
public class IgnoredJsonSerializer extends JsonSerializer<Object> {
    @Override
    public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
        gen.writeString("...ignored...");
    }
}
